<?php 
include "includes/session.php";
include "includes/comunes.php";




?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sistema de Registro de Atencion</title>

<link href="estilos.css" rel="stylesheet" type="text/css" />

<!--libreria jquery central-->
<script src="jquery-ui/js/jquery-1.9.1.js"></script>
<!--fin libreria central-->

<!--Librerias para el combo-->
<script language="JavaScript" type="text/javascript" src="combos/jquery.chainedSelects.js"></script>
<!--fin libreria-->

<!--librerias ui-->
<link href="jquery-ui/css/ui-lightness/jquery-ui-1.10.2.custom.css" rel="stylesheet"/>
<script src="jquery-ui/js/jquery-ui-1.10.2.custom.js"></script>
<!--fin libreria-->
<!--estilo para el scroll-->
<style>
  .ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    /* prevent horizontal scrollbar */
    overflow-x: hidden;
  }
  /* IE 6 doesn't support max-height
   * we use height instead, but this forces the menu to always be this tall
   */
  * html .ui-autocomplete {
    height: 300px;
  }
  </style>
<!--
  fin estilo scroll-->


<script language="JavaScript" type="text/javascript">
$(function()
{

//funcion que implementa combos
	/*$('#pedido').chainSelect('#sucursal','combosucursal.php',
	{
		before:function (target) //before request hide the target combobox and display the loading message
		{
			$("#loading").css("display","block");
			$(target).css("display","none");
		},
		after:function (target) //after request show the target combobox and hide the loading message
		{
			$("#loading").css("display","none");
			$(target).css("display","inline");
		}
	});*/
      // fin funcion

//          funcion que implementa autocompletado de articulos
     
 $( "#fecha" ).datepicker({
         dateFormat: "yy-mm-dd"

      });
	  
	  $( "#fechah" ).datepicker({
         dateFormat: "yy-mm-dd"

      });





//              funcion para validacion de formularios

             $("#pedido").submit(function () {

                if($("#tipopedido").val() == 0) {
                    alert("Debe ingresar el tipo de pedido");
                    return false;
                }

               
           
          
            
        });

//              fin funcion
      
$( "#menu" ).menu({position: {at: "left bottom"}});


	
		 
       

});
</script>
 <style>
    #add, #del ,#add1, #del1 {cursor:pointer;text-decoration:none;color:#00f;float:left;font-size:10px;font-weight:bold;}
	.tablaDinamica{
	border:1px solid #ccc;
	width:100%;
	font-size:13px;}
	.tablaTitulo{
	font-weight:bold;
	background:#ddd;
	
	}
    </style>
</head>

<body>

<div class="container">
<?php include "includes/head.php"?>
   <div class="content">
       <div class="tituloprincipal"><img src="img/nuevo.png" width="25" height="25" border="0"/> Alta Novedades
          <?php include 'includes/submenu.php';?>  
           </div>
       <form id="pedido" name="pedido" method="POST" enctype="multipart/form-data" action="grabarNovedad.php">
       <div class="contenedorpedido">
	   <fieldset>
             <legend><b>Datos de Usuario</b></legend>
             <table>
			 <tr>
			 
               
                 <tr>
                     
                     <td class="textotablamenuform">Nombre y Apellido </td>
                    <td class="textotablamenuform">
					 <select name="pedido" required id="pedido"  class="campo_form">
                  
                             <?php
                             $ped=obtener_empleados();

                             while($regPed=mysql_fetch_array($ped)){
                                 
                                       echo "<option value='".utf8_encode($regPed['FichadaLegajo'])."'>".utf8_encode($regPed['usuariosApellido'].",".$regPed['usuariosNombre'])." (".utf8_encode($regPed['FichadaLegajo']).")</option>";


                             }

                             ?>

                         </select>
					</td>
               </tr>
				<tr>	 
                  
                     <td class="textotablamenuform">Sucursal </td>
                    <td class="textotablamenuform">
					 <select name="sucursal" required id="sucursal"  class="campo_form">
                      
                             <?php
                             $ped=obtener_sucursales();

                             while($regPed=mysql_fetch_array($ped)){
                                 
                               echo "<option value='".utf8_encode($regPed['sucursalId'])."'>".utf8_encode($regPed['sucursalNombre'])." (".utf8_encode($regPed['sucursalCodigo']).")</option>";


                             }

                             ?>

                         </select>
					</td>
                 </tr>
			
                 
                 <tr>	 
                  
                     <td class="textotablamenuform">Tipo </td>
                    <td class="textotablamenuform">
					<select name="novedades" required id="novedades"  class="campo_form">
                      
                             <?php
                             $ped=obtener_novedades();

                             while($regPed=mysql_fetch_array($ped)){
                                 if($regPed['TipoLicenciaId']<>2)
                                  echo "<option value='".utf8_encode($regPed['TipoLicenciaId'])."'>".utf8_encode($regPed['TipoLicenciaNombre'])." </option>";


                             }

                             ?>

                         </select>
					</td>
                 </tr>
				 
				   <tr>	 
                  
                    <td class="textotablamenuform">Fecha Desde</td>
                     <td class="textotablamenuform"><input type="text" name="fecha" id="fecha" value="" required class="campo_form" /></td>
					 <td class="textotablamenuform">Fecha Hasta</td>
                     <td class="textotablamenuform"><input type="text" name="fechah" id="fechah" value="" required class="campo_form" /></td>
				</tr>
				 
				   <tr>	 	 
					 <td class="textotablamenuform">Observacion</td>
                     <td colspan="3" class="textotablamenuform">
					 <textarea class="textotablamenuform" rows="10" cols="35"name="observacion"></textarea>
					 </td>
					 
                 </tr>
				 
			   <tr>
			   <td class="textotablamenuform" style="text-align: right;" colspan="5">
                         <input type="reset" name="enviar" value="Restablecer"  class="boton_form"/>
                         <input name="submit" id="submit" type="submit" value="Grabar Fichada" class="boton_form"/>
                     </td>
					 </tr>
             </table>
			  
             </table>
        </fieldset>
       
          
           
       </div>
   </form>
       <div class="clear"></div>
   <br>
   </div>
  <?php include "includes/pie.php"?>
  
</div>
</body>
</html>
